using System;
using CodePlex.CodePlexClientLibrary;
using CodePlex.DependencyInjection;
using CodePlex.TfsLibrary;

namespace CodePlex.CodePlexClient
{
    public class Program : ApplicationBase<HelpCommand>
    {
        [STAThread]
        public static int Main()
        {
            return new Program().Run();
        }

        protected override void RegisterCommands(CommandLineHelper helper)
        {
            helper.RegisterCommand<AddCommand>();
            helper.RegisterCommand<ApplyPatchCommand>();
            helper.RegisterCommand<CheckoutCommand_CodePlex>();
            helper.RegisterCommand<ClearCacheCommand>();
            helper.RegisterCommand<CommitCommand>();
            helper.RegisterCommand<DeleteCommand>();
            helper.RegisterCommand<DiagnosticsCommand>();
            helper.RegisterCommand<HelpCommand>();
            helper.RegisterCommand<InfoCommand>();
            helper.RegisterCommand<ListCommand_CodePlex>();
            helper.RegisterCommand<ListProjectsCommand>();
            helper.RegisterCommand<LogCommand>();
            helper.RegisterCommand<MakePatchCommand>();
            helper.RegisterCommand<ResolveCommand>();
            helper.RegisterCommand<RevertCommand>();
            helper.RegisterCommand<StatusCommand>();
            helper.RegisterCommand<SyncupCommand>();
            helper.RegisterCommand<UpdateCommand>();
        }

        protected override void SetupContainer(DependencyContainer container)
        {
            container.RegisterTypeMapping<IAppConfig, AppConfig>();
            base.SetupContainer(container);
        }
    }
}